//
// Created by 下次一定 on 2021/9/17.
//
#include <iostream>
#include <queue>
#include <algorithm>
#include <cstring>
using namespace std;

const int N = 100010;

int n,m;
int h[N],e[N],ne[N],idx;
int d[N];
queue<int> q;

void add(int a,int b){
    e[idx] = b;
    ne[idx] = h[a];
    h[a] = idx++;
}

bool topset(){
    for(int i = 1 ; i <= n ; i++)
        if(!d[i]){
            q.push(i);
            cout << i << " ";
        }

    int count = 1;
    while(!q.empty()){
        int t = q.front();
        q.pop();

        for(int i = h[t];i!=-1;i = ne[i]){
            int j = e[i];
            d[j]--;
            if(d[j]==0){
                count ++;
                q.push(j);
                cout << j << " ";
            }
        }
    }
    if(count == n)return true;
    else return false;

}

int main(){
    cin >> n >> m;

    memset(h,-1,sizeof  h);

    for (int i = 0 ; i < m ; i++){
        int a,b;
        cin >> a >> b;
        add(a,b);
        d[b] ++ ;
    }

    if(topset()){

    }else puts("-1");

}

